<div class="inside">
  <aside class="navigationPanel">
     
     <div class="tree pagesLinks">
        <ul>
           <ul>
              <?php if($this->session->userdata('level') == 1):?>
              <li> <a href="<?php echo $baseurl.'account.html'?>">Danh sách tài khoản</a> </li>
              <li> <a href="<?php echo $baseurl.'classify-device.html'?>">Phân loại nhóm khách hàng</a> </li>
              <?php endif;?>  
              <li> <a href="#" class="active">Thông tin tài khoản</a> </li>
              <li> <a href="<?php echo $baseurl.'setting-password.html'?>">Mật khẩu</a> </li>
           </ul>
        </ul>
     </div>
  </aside>
  <div class="contentPanel">
     <div class="pages" id="profile">
        <div class="profile-edit-form">
              <?php $att = array('id' => 'frm-profileEdit-editForm', 'class' => 'profileForm');echo form_open('', $att);?>
              <div class="contentBox switcher" style="height: 100%;">
                 <h3>Thông tin tài khoản</h3>
                 <?php if(validation_errors()):?>
                    <h4>
                        <p><?php echo validation_errors(); ?></p>
                    </h4>
                    <?php endif;?>
                 <div class="contentSwitcher hide" style="display: block;">
                    <div class="insideContentBox">
                      
                       <label for="frm-fullname">Họ tên:</label> 
                       <input type="text" name="fullname" value="<?php echo $data->fullname?>" class="ipt" autocomplete="off" id="frm-fullname">
                       
                       <label for="frm-mobile">Số điện thoại:</label> 
                       <input type="text" name="mobile" value="<?php echo $data->mobile?>" class="ipt" autocomplete="off" id="frm-mobile">
                       
                       <label for="frm-email">Email:</label> 
                       <input type="text" name="email"  value="<?php echo $data->email?>" class="ipt" autocomplete="off" id="frm-email">
                       
                       <label for="frm-address">Địa chỉ:</label> 
                       <input type="text" name="address"  value="<?php echo $data->address?>" class="ipt" autocomplete="off" id="frm-address">
                 
                                                                                                                                                                                                                                      
                       <label for="frm-img">Ảnh đại diện:</label> 
                        <div class="uploadImage">
                            <img src="<?php echo $this->session->userdata('img') ? $baseurl.$this->session->userdata('img') : $baseurl.'public/assets/images/avatar.png' ;?>" id="display_image_" onError="this.src='<?php $baseurl;?>public/upload/default.jpg';"/>
                            <input class="image-input" type="file" name="img_uploads" id="image_upload" onchange="convertimage('image_upload', 'image_', 'display_image_');" value="" />
                            <label class="hidden-label" for="image_upload"></label>
                            <input type="hidden" name="image_" id="image_" value="" />
                            <input type="hidden" name="image_verify" id="image_verify" value="<?php echo $this->session->userdata('img')?>" />
                            <input type="hidden" name="image_check" id="image_check" value="<?php echo $this->session->userdata('img')?>" />
                        </div>
                       <!--div class="inputHolder c">
                          <input type="hidden" name="img_hidden" id="img_hd" value="" />
                          <input type="file" name="img" onchange="convertimage();" class="cfr" autocomplete="off" id="frm-img">
                          <div class="req"></div>
                          <div class="reqBar"></div>
                       </div-->
                       
                       <div class="lineButton">
                          <button type="submit" class="applyBtn btn btn-small btn-primary"><span>Lưu lại</span></button>
                          <button style="font-weight: bold;" type="button" onclick="window.location='<?php echo $baseurl.'setting.html'?>'" class="cancelBtn btn btn-default btn-small"><span>Hủy bỏ</span></button>
                       </div>
                       
                    </div>
                 </div>
                  
                 
              </div>
              
           </form>
        </div>
     </div>
  </div>
</div> 
<script>
function convertimage(id, id_parse, img_show, check_image)
{
    var id = id;
    var id_parse = id_parse;
    var img_show = img_show;
    var check_image = check_image;
    var filesSelected = document.getElementById(id).files;
    if (filesSelected.length > 0)
    {
        var fileToLoad = filesSelected[0];

        var fileReader = new FileReader();

        fileReader.onload = function(fileLoadedEvent) 
        {
            $("#"+id_parse).attr('value', fileLoadedEvent.target.result);
            $("#"+check_image).val('1');
            //document.getElementById('cddd').html(fileLoadedEvent.target.result);
            $("#"+img_show).attr('src', fileLoadedEvent.target.result);
        };

        fileReader.readAsDataURL(fileToLoad);
    }
}
/*function convertimage()
{
    
        var filesSelected = document.getElementById("frm-img").files;
        if (filesSelected.length > 0)
        {
            var fileToLoad = filesSelected[0];
    
            var fileReader = new FileReader();
    
            fileReader.onload = function(fileLoadedEvent) 
            {
                var textAreaFileContents = document.getElementById
                (
                    "textAreaFileContents"
                    );
                $("#img_hd").attr('value', fileLoadedEvent.target.result);
            };
    
            fileReader.readAsDataURL(fileToLoad);
        }
    
    
    
}*/
</script>
<style>
body.flash-permanent .contentPanel {
    padding: 100px 0px 18px !important;
}
.cfr {
    line-height: 1px !important;padding: 15px 79px 0px 12px !important;height: 37px !important;
}
</style>